package cn.edu.ccut.refactor;

import java.util.ResourceBundle;
import org.eclipse.compare.CompareConfiguration;
import org.eclipse.compare.contentmergeviewer.ContentMergeViewer;
import org.eclipse.compare.internal.Utilities;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;

/**
 * 
 * @author Bai Yucheng 2008-1-10
 * 
 */
public class StudioMergeViewer extends ContentMergeViewer {
	private static final String BUNDLE_NAME = "com.saturn.saturnproject.refactoring.StudioMergeViewer"; 
	private Composite fLeft;
	private Composite fRight;

	public StudioMergeViewer(int i, ResourceBundle resourcebundle, CompareConfiguration compareconfiguration) {
		super(i, resourcebundle, compareconfiguration);
	}

	public StudioMergeViewer(Composite composite, int i, CompareConfiguration compareconfiguration) {
		super(i, ResourceBundle.getBundle(BUNDLE_NAME), compareconfiguration);
		buildControl(composite);
		String s = Utilities.getString(getResourceBundle(), "title"); 
		getControl().setData("org.eclipse.compare.CompareUI.CompareViewerTitle", s); 
	}

	protected void createControls(Composite composite) {
		fLeft = new Composite(composite, 524288);
		fRight = new Composite(composite, 524288);
		fLeft.setLayoutData(new GridData(1808));
		fLeft.setLayout(new GridLayout());
		Label label = new Label(fLeft, 0);
		label.setText("No preview view"); 
	}

	protected void handleResizeAncestor(int i, int j, int k, int l) {
	}

	protected void handleResizeLeftRight(int i, int j, int k, int l, int i1, int j1) {
		fLeft.setBounds(i, j, k, j1);
		fRight.setBounds(i + k + l, j, i1, j1);
	}

	protected void updateContent(Object obj, Object obj1, Object obj2) {
	}

	protected void copy(boolean flag) {
	}

	protected byte[] getContents(boolean flag) {
		return null;
	}

}
